#ifndef _MSOCKET_H_
#define _MSOCKET_H_


extern int Connect( const char* address,int port); 
extern int SendMsg(const char* msg,int len); 
extern unsigned int Com_Dev_Connect( unsigned char *ip,unsigned short port, unsigned int timeout, unsigned int channel ); 
extern unsigned int Com_Dev_TxData( unsigned char *buf, unsigned int len, unsigned int timeout, unsigned int channel );
extern unsigned int Com_Dev_RxData( unsigned char *buf, unsigned int *len, unsigned int bufsize, unsigned int timeout, unsigned int channel );

extern unsigned int Com_Dev_TxData1( unsigned char *buf, unsigned int len, unsigned int timeout, unsigned int channel );
extern unsigned int Com_Dev_RxData1( unsigned char *buf, unsigned int *len, unsigned int bufsize, unsigned int timeout, unsigned int channel );

extern unsigned int Com_Dev_Disconnect( unsigned int channel );						//断开连接

extern void Com_Hook_DebugOutAscii( unsigned char *data, unsigned int datalen );
extern void Com_Hook_DebugOutHex( unsigned char *data, unsigned int datalen );

extern unsigned int Com_Dev_Open( void );									//打开  
extern unsigned int Com_Dev_Close( void );									//关闭  
extern unsigned int Com_Dev_Start( void ); 									//启动 
extern unsigned int Com_Dev_Restart( void );									//重启 
extern unsigned int Com_Dev_OSLinkProc( void );								//连路层实时处理
extern unsigned int Com_Dev_GetResource( void );								//获取模块资源 空闲，忙
extern unsigned int Com_Dev_Cfg( unsigned int commtype, unsigned int baud, unsigned char *apn, unsigned char *name, unsigned char *psd );
#endif

